package paperless.information.notice;

import com.example.paperless.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.LinearLayout.LayoutParams;

public class NoticeView extends FrameLayout {
	  
	TextView mTitle;
	TextView mDialogue;
	
	public NoticeView(Context context, String title, String dialogue, boolean expanded) {
        super(context);
        LayoutInflater inflater = LayoutInflater.from(context);
		inflater.inflate(com.example.paperless.R.layout.notice_fragment_layout, this);
    
        mTitle = (TextView)findViewById(R.id.title);
        mTitle.setText(title);

        mTitle = new TextView(context);
        mTitle.setText(title);
        
        
        mDialogue = (TextView)findViewById(R.id.dialog);
        mDialogue.setText(dialogue);
        mDialogue.setVisibility(expanded ? VISIBLE : GONE);
    }
    
    public void setTitle(String title) {
        mTitle.setText(title);
    }
    
    public void setDialogue(String words) {
        mDialogue.setText(words);
    }
    
    public void setExpanded(boolean expanded) {
        mDialogue.setVisibility(expanded ? VISIBLE : GONE);
    }
   
}